import { defineStore } from "pinia";

// 创建仓库
export const useUserStore=defineStore('user',{
// 配置
state:()=>({
    name:'李四',
    age:40
}),
actions:{
    updateName(newVal){
        this.name=newVal
    },
    addaAge(){
        this.age++
    }

}
})